package com.fire.control.system.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.fire.control.system.module.notice.service.NoticeService;

@PersistJobDataAfterExecution
public class NoticeJob implements Job {
	
	private static final Logger logger = LoggerFactory.getLogger(DutyDetectionJob.class);
	
	@Autowired NoticeService noticeService;

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		String noticeId = (String)context.getMergedJobDataMap().get("job");
		logger.info("--------quartz job-发送通知Id:"+noticeId);
		noticeService.sendNoticeDetail(noticeId);
	}

}